package com.community.feign.contents.post;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.community.common.core.utils.Result;
import com.community.feign.contents.dto.PostDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(name = "community-contents",path = "contents/post" ,contextId = "community-contents-post")
public interface PostFeign {
    @PostMapping
    public boolean save(@RequestBody PostDTO dto);

    @PostMapping("page")
    public Result<Page<PostDTO>> page(@RequestBody Page<PostDTO> params);
}
